3.2.2 \(\int \frac {\sec ^4(c+d x)}{a+i a \tan (c+d x)} \, dx\) [102]

Optimal. Leaf size=34 \[ \frac {\tan (c+d x)}{a d}-\frac {i \tan ^2(c+d x)}{2 a d} \]

[Out]

tan(d*x+c)/a/d-1/2*I*tan(d*x+c)^2/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {3568} \begin {gather*} \frac {\tan (c+d x)}{a d}-\frac {i \tan ^2(c+d x)}{2 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^4/(a + I*a*Tan[c + d*x]),x]

[Out]

Tan[c + d*x]/(a*d) - ((I/2)*Tan[c + d*x]^2)/(a*d)

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\sec ^4(c+d x)}{a+i a \tan (c+d x)} \, dx &=-\frac {i \text {Subst}(\int (a-x) \, dx,x,i a \tan (c+d x))}{a^3 d}\\ &=\frac {\tan (c+d x)}{a d}-\frac {i \tan ^2(c+d x)}{2 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.24, size = 35, normalized size = 1.03 \begin {gather*} \frac {\sec (c+d x) (-i \sec (c+d x)+2 \sec (c) \sin (d x))}{2 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^4/(a + I*a*Tan[c + d*x]),x]

[Out]

(Sec[c + d*x]*((-I)*Sec[c + d*x] + 2*Sec[c]*Sin[d*x]))/(2*a*d)

________________________________________________________________________________________

Maple [A]
time = 0.72, size = 30, normalized size = 0.88

method result size
risch \(\frac {2 i}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}\) \(23\)
derivativedivides \(-\frac {i \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+i \tan \left (d x +c \right )\right )}{d a}\) \(30\)
default \(-\frac {i \left (\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}+i \tan \left (d x +c \right )\right )}{d a}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-I/d/a*(1/2*tan(d*x+c)^2+I*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 27, normalized size = 0.79 \begin {gather*} -\frac {i \, \tan \left (d x + c\right )^{2} - 2 \, \tan \left (d x + c\right )}{2 \, a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

-1/2*(I*tan(d*x + c)^2 - 2*tan(d*x + c))/(a*d)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 33, normalized size = 0.97 \begin {gather*} \frac {2 i}{a d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

2*I/(a*d*e^(4*I*d*x + 4*I*c) + 2*a*d*e^(2*I*d*x + 2*I*c) + a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {\sec ^{4}{\left (c + d x \right )}}{\tan {\left (c + d x \right )} - i}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**4/(a+I*a*tan(d*x+c)),x)

[Out]

-I*Integral(sec(c + d*x)**4/(tan(c + d*x) - I), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.50, size = 27, normalized size = 0.79 \begin {gather*} -\frac {i \, \tan \left (d x + c\right )^{2} - 2 \, \tan \left (d x + c\right )}{2 \, a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^4/(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

-1/2*(I*tan(d*x + c)^2 - 2*tan(d*x + c))/(a*d)

________________________________________________________________________________________

Mupad [B]
time = 3.33, size = 25, normalized size = 0.74 \begin {gather*} -\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (-2+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}{2\,a\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^4*(a + a*tan(c + d*x)*1i)),x)

[Out]

-(tan(c + d*x)*(tan(c + d*x)*1i - 2))/(2*a*d)

________________________________________________________________________________________